{include file='comdir/head.html'}
<body>

<div class="header">
	<div class="pull-left left">
		<h1><b>后台管理系统</b></h1>
	</div>
	<div class="pull-right right">
		<span>欢迎你，{$name}</span>
		<!--<a onclick="javascript:window.location.href='modify_password.html'">密码修改</a>-->
		<a onclick="modify_pass();">密码修改</a>
		<a onclick="javascript:window.location.href='{$_URL}Login/loginout'">退出</a>
	</div>
	<div class="clearfix"></div>
</div>
<div class="main">
	<div class="side-left">
		<div class="nav_left">
			<div class="nav_leftlist">
				{foreach $menu as $vk=> $v}
				{if $v['parentid']==0}
    			<dl>
					<dt>{$v.name}</dt>
					
					<dd {if $vk!=0}style="display:none"{/if}>
					{foreach $menu as $k=> $x}
						{if $x['parentid']==$v['id'] && $x['isshow']==1}
						<a {if $x['id']==101} class="active" {/if} data-id="{$_URL}{$x['ctlurl']}">{$x.name}<b></b></a>
						{/if}
					{/foreach}
					</dd>
				</dl>
				{/if}
				{/foreach}
			</div>
		</div>
		<div class="arrow"></div>
	</div>
	<div class="side-right">
		<iframe id="my_iframe" width="100%" height="98%" src="{$_URL}Config/syslists" frameborder="0"></iframe>
	</div>
</div>

<div class="pop">
	<div class="admin_login2">
		<dl>
			<dd>
				<input type="password" name="pass" placeholder="旧密码" class="inptext pass">
			</dd>
			<dd>
				<input type="password" name="repass" placeholder="新密码" class="inptext repass">
			</dd>
			<dd class="submit-box">
				<input type="submit" value="确认修改" class="submit" id="check-btn">
			</dd>
		</dl>
	</div>
</div>

<script src="{$_URL}static/js/global.js"></script><!--页面效果自定义js-->

<script>
var _URL='{$_URL}';
{literal}
	function modify_pass(){
		layer.open({
			type:1,
			skin: 'layui-layer-molv', //样式类名
			area:['400','300'],
			title:['修改密码','font-size:16px;background:#39adb4;'],
			content:$('.pop')
		});
	}
	$(function(){
		var pass_stauts=true;
		$('.submit').click(function(){
			var pass=$('.pass').val();
			var repass=$('.repass').val();
			if(!pass_stauts){//防止恶意提交
            //	return false;
        	}
         	pass_stauts=false;
         	var url=_URL+"Login/pass";
	        //验证结束
	        _ajaxs.post(url,'pass='+pass+"&repass="+repass,function _result(data){
	            pass_stauts=true;
	            layer.msg(data.msg,{icon: 1}, function(){
	                if(data.status){
	                    $('.pop').hide();
	                }
	            });
	        });
		})
	})
{/literal}
</script>
</body>
</html>
